new Vue({
	el: "body",
	data: {
		joblist: {},
		isxx: false,
	},
	methods: {

	},
	created: function() {
		init();
		var city = get(geturlitem(location.search, "city"));
		var jobtype = get(geturlitem(location.search, "jobtype"));
		var industry = get(geturlitem(location.search, "industry"));
		var searchtext=get(geturlitem(location.search, "searchtext"));
		//		console.log(city+jobtype+industry);
		var _this = this;
		var querycity = new AV.Query('position');
		querycity.equalTo('city', city);
		var queryjobtype = new AV.Query('position');
		queryjobtype.equalTo('jobtype', jobtype);

		var queryindustry = new AV.Query('position');
		queryindustry.equalTo('industry', industry);

		var query = AV.Query.or(querycity, queryjobtype, queryindustry);
		query.find().then(function(success) {
			console.log(success);
			if(success.length == 0) {
				_this.isxx = true;
			}else{
				_this.isxx = false;
			}
			_this.joblist = success;

		}).catch(function(error) {
			console.log(JSON.stringify(error));
		});

		//模糊查询
		var query1 = new AV.Query('position'); //获取职位列表
		query1.contains('companyName', searchtext);
		var query2 = new AV.Query('position'); //获取职位列表
		query2.contains('positionName', searchtext);
		var query3 = new AV.Query('position'); //获取职位列表
		query3.contains('zhize', searchtext);
		var query4 = new AV.Query('position'); //获取职位列表
		query4.contains('yaoqiu', searchtext);
		var query3 = AV.Query.or(query1, query2,query3,query4);
		query3.find().then(function(success) {
			console.log(success);
			if(success.length == 0) {
				_this.isxx = true;
			}else{
				_this.isxx = false;
			}
			_this.joblist = success;
		}).catch(function(error) {
			console.log(JSON.stringify(error));
		});
	}
})